package com.github.cbyzzy.batch;

import com.github.cbyzzy.model.entity.DeviceEvent;
import com.github.cbyzzy.service.DeviceEventService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.Async;
import org.springframework.stereotype.Component;

@Component
public class DeviceEventAsync {

    @Autowired
    DeviceEventService deviceEventService;

    @Async
    public void saveDeviceEventAsync(DeviceEvent deviceEvent){
        deviceEventService.save(deviceEvent);
//        System.out.println("入库成功!!!!");
    }


}
